package com.kyh.sys.entity;

import java.util.Date;

import javax.persistence.Table;

import com.kyh.annotation.Model;
import com.kyh.entity.base.BaseEntity;


@Table(name="sys_admin", catalog="adminid")
public class Admin extends BaseEntity<Admin> {

	@Model(nameTable="adminid")
	private Long adminid; // 主键ID
	@Model(nameTable="roleId")
	private Long roleId; // 角色ID
	@Model(nameTable="adminloginname")
	private String adminloginname; // 管理员登录名
	private String adminpassword; // 密码（不加密）
	@Model(nameTable="adminremark")
	private String adminremark; // 备注说明
	private String admintoken; // 登录唯一token值
	@Model(nameTable="status")
	private Integer status; // 
	@Model(nameTable="createTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date createTime; // 
	@Model(nameTable="updateTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date updateTime; // 

	public Long getAdminid() {
		return adminid;
	}
	public Admin setAdminid(Long adminid) {
		this.adminid = adminid;
		return this;
	}
	public Long getRoleId() {
		return roleId;
	}
	public Admin setRoleId(Long roleId) {
		this.roleId = roleId;
		return this;
	}
	public String getAdminloginname() {
		return adminloginname;
	}
	public Admin setAdminloginname(String adminloginname) {
		this.adminloginname = adminloginname;
		return this;
	}
	public String getAdminpassword() {
		return adminpassword;
	}
	public Admin setAdminpassword(String adminpassword) {
		this.adminpassword = adminpassword;
		return this;
	}
	public String getAdminremark() {
		return adminremark;
	}
	public Admin setAdminremark(String adminremark) {
		this.adminremark = adminremark;
		return this;
	}
	public String getAdmintoken() {
		return admintoken;
	}
	public Admin setAdmintoken(String admintoken) {
		this.admintoken = admintoken;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public Admin setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public Admin setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public Admin setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static Admin admin(
			Long roleId,
			String adminloginname,
			String adminpassword,
			String adminremark,
			String admintoken,
			Integer status
			) {
		Admin entity = new Admin();
		entity.setRoleId(roleId);
		entity.setAdminloginname(adminloginname);
		entity.setAdminpassword(adminpassword);
		entity.setAdminremark(adminremark);
		entity.setAdmintoken(admintoken);
		entity.setStatus(status);
		return entity;
	}
}